$(function(){
    $.ajax({
        type : "get",
        // url : "src/js/wulianwang.json",
        url : baseUrl + "/wlw/indexAll",
        dataType : "json",
        cache : false,
        data:{},
        success : function(data) {


            var tubiaoData = data;
            var bufang2=[];
            var bufang=[];
            var chefang2=[];
            var yjgHtml='';
            var detail2=[];
            var xfsHtml='';
            var syShebei='';
            var xfShebei='';
            var yjShebei='';
            var chefang=[];
            for(var k=0;k<tubiaoData.wulianwang[0].xfsAllInfo[0].xfsInfo.length;k++){
                syShebei+='<tr><td>'+tubiaoData.wulianwang[0].xfsAllInfo[0].xfsInfo[k].firehydrantNo+'</td><td>'+tubiaoData.wulianwang[0].xfsAllInfo[0].xfsInfo[k].hydrulicHeartInfo[0].batteryMeter+'</td><td>'+tubiaoData.wulianwang[0].xfsAllInfo[0].xfsInfo[k].hydrulicHeartInfo[0].tiltAngle+'</td><td>'+tubiaoData.wulianwang[0].xfsAllInfo[0].xfsInfo[k].hydrulicHeartInfo[0].ambientTemperature+'</td><td>'+tubiaoData.wulianwang[0].xfsAllInfo[0].xfsInfo[k].hydrulicHeartInfo[0].signalIntensity+'</td><td>'+tubiaoData.wulianwang[0].xfsAllInfo[0].xfsInfo[k].hydrulicHeartInfo[0].batteryVoltage+'</td></tr>';
            }
            for(var j=0;j<tubiaoData.wulianwang[0].xfsAllInfo[0].xfsInfo.length;j++){
                xfShebei+='<tr><td>'+tubiaoData.wulianwang[0].xfsAllInfo[0].xfsInfo[j].firehydrantNo+'</td><td>'+tubiaoData.wulianwang[0].xfsAllInfo[0].xfsInfo[j].coverHeartInfo[0].batteryMeter+'</td><td>'+tubiaoData.wulianwang[0].xfsAllInfo[0].xfsInfo[j].coverHeartInfo[0].tiltAngle+'</td><td>'+tubiaoData.wulianwang[0].xfsAllInfo[0].xfsInfo[j].coverHeartInfo[0].ambientTemperature+'</td><td>'+tubiaoData.wulianwang[0].xfsAllInfo[0].xfsInfo[j].coverHeartInfo[0].signalIntensity+'</td><td>'+tubiaoData.wulianwang[0].xfsAllInfo[0].xfsInfo[j].coverHeartInfo[0].batteryVoltage+'</td></tr>';
            }
            for(var i=0;i<tubiaoData.wulianwang[1].yjgAllInfo[0].yjgInfo.length;i++){
                if(tubiaoData.wulianwang[1].yjgAllInfo[0].yjgInfo[i].coverHeartInfo!=''){
                    yjShebei+='<tr><td>'+tubiaoData.wulianwang[1].yjgAllInfo[0].yjgInfo[i].coverHeartInfo[0].coverID+'</td><td>'+tubiaoData.wulianwang[1].yjgAllInfo[0].yjgInfo[i].coverHeartInfo[0].electricity+'</td><td>'+tubiaoData.wulianwang[1].yjgAllInfo[0].yjgInfo[i].coverHeartInfo[0].inclinationAngle+'</td><td>'+tubiaoData.wulianwang[1].yjgAllInfo[0].yjgInfo[i].coverHeartInfo[0].signalIntensity+'</td><td>'+tubiaoData.wulianwang[1].yjgAllInfo[0].yjgInfo[i].coverHeartInfo[0].redidualVoltage+'</td></tr>';
                }}
            $('.shebei-detail2').append(syShebei);
            $('.shebei-detail3').append(xfShebei);
            $('.shebei-detail1').append(yjShebei);
            $(function () {
                var detail=[];
                for(var i=0;i<tubiaoData.wulianwang[1].yjgAllInfo[2].alarmInfo.datail.length;i++){
                    yjgHtml+='<li><span></span><span style="width: 100px">'+tubiaoData.wulianwang[1].yjgAllInfo[2].alarmInfo.datail[i].bizName+'</span><span style="width: 50px">'+tubiaoData.wulianwang[1].yjgAllInfo[2].alarmInfo.datail[i].count+'</span><span style="width: 50px">'+tubiaoData.wulianwang[1].yjgAllInfo[2].alarmInfo.datail[i].rate+'</span></li>'
                    detail.push(tubiaoData.wulianwang[1].yjgAllInfo[2].alarmInfo.datail[i].count);
                };
                for(var j=0;j<5;j++){
                    xfsHtml+='<li><span></span><span style="width: 100px">'+tubiaoData.wulianwang[0].xfsAllInfo[2].alarmInfo.datail[j].bizName+'</span><span style="width: 50px">'+tubiaoData.wulianwang[0].xfsAllInfo[2].alarmInfo.datail[j].count+'</span><span style="width: 60px">'+tubiaoData.wulianwang[0].xfsAllInfo[2].alarmInfo.datail[j].rate+'</span></li>'

                    detail2.push(tubiaoData.wulianwang[0].xfsAllInfo[2].alarmInfo.datail[j].count);
                }
                $('.yjg-gaojing').append(xfsHtml);
                var  gaojingChart = echarts.init(document.getElementById('gaojing'));
                var   gaojingOption = {
                    calculable : true,
                    series : [
                        {
                            name:'面积模式',
                            type:'pie',
                            itemStyle:{
                                normal:{
                                    color: function (params){
                                        var colorList = [' #204ef7','#29b6ff','#1ac098','#faa525','#ff7859','#a04ef7','#29b600','#189098','#fa6425','#007859','#a04107','#1c4107','#a04bc7','#a04a07'];
                                        return colorList[params.dataIndex];

                                    }

                                }
                            },
                            label:{
                                normal:{
                                    show:true,
                                    position:'outside',
                                    formatter:'{c}',
                                    textStyle:{
                                        fontSize:16
                                    }
                                }
                            },
                            labelLine:{
                                normal:{
                                    length:2,
                                    length2:3
                                }
                            },
                            radius : [20, 40],
                            center : ['50%', '60%'],
                            roseType : 'radius',
                            data:detail2
                        }
                    ]
                };
                gaojingChart.setOption( gaojingOption);
            });
            $(function() {
                date2=tubiaoData.wulianwang[0].xfsAllInfo[2].alarmInfo.trend[0].months;
                var kaigai2=tubiaoData.wulianwang[0].xfsAllInfo[2].alarmInfo.trend[1]["开盖告警"];
                var chushui2=tubiaoData.wulianwang[0].xfsAllInfo[2].alarmInfo.trend[2]["出水告警"];
                var qingxie2=tubiaoData.wulianwang[0].xfsAllInfo[2].alarmInfo.trend[3]["倾斜告警(闷盖)"];
                var pohuai2=tubiaoData.wulianwang[0].xfsAllInfo[2].alarmInfo.trend[4]["破坏告警(闷盖)"];
                var quedian2=tubiaoData.wulianwang[0].xfsAllInfo[2].alarmInfo.trend[5]["缺电告警(闷盖)"];
                var guzhang2=tubiaoData.wulianwang[0].xfsAllInfo[2].alarmInfo.trend[6]["故障告警(闷盖)"];
                var shuiya2=tubiaoData.wulianwang[0].xfsAllInfo[2].alarmInfo.trend[7]["水压过高"];
                var gugao2=tubiaoData.wulianwang[0].xfsAllInfo[2].alarmInfo.trend[8]["故障告警(水压)"];
                var quegao2=tubiaoData.wulianwang[0].xfsAllInfo[2].alarmInfo.trend[9]["缺电告警(水压)"];
                var pogao2=tubiaoData.wulianwang[0].xfsAllInfo[2].alarmInfo.trend[10]["破坏告警(水压)"];
                var qinggao2=tubiaoData.wulianwang[0].xfsAllInfo[2].alarmInfo.trend[11]["倾斜告警(水压)"];
                var shuidi2=tubiaoData.wulianwang[0].xfsAllInfo[2].alarmInfo.trend[12]["水压过低"];
                var shigao2=tubiaoData.wulianwang[0].xfsAllInfo[2].alarmInfo.trend[13]["失联告警(闷盖)"];
                var shishui2=tubiaoData.wulianwang[0].xfsAllInfo[2].alarmInfo.trend[14]["失联告警(水压)"];
                date=tubiaoData.wulianwang[1].yjgAllInfo[2].alarmInfo.trend[0].months;
                didianliang=tubiaoData.wulianwang[1].yjgAllInfo[2].alarmInfo.trend[1]["低电量告警"];
                shuiwei=tubiaoData.wulianwang[1].yjgAllInfo[2].alarmInfo.trend[2]["水位告警"];
                qiaojing=tubiaoData.wulianwang[1].yjgAllInfo[2].alarmInfo.trend[3]["撬井告警"];
                kaijing=tubiaoData.wulianwang[1].yjgAllInfo[2].alarmInfo.trend[4]["开井告警"];
                xunjian=tubiaoData.wulianwang[1].yjgAllInfo[2].alarmInfo.trend[5]["巡检告警"];
                shilian=tubiaoData.wulianwang[1].yjgAllInfo[2].alarmInfo.trend[6]["失联告警"];


                var  qushiChart = echarts.init(document.getElementById('qushi'));


                var  qushiOption = {


                    grid: {
                        left: '3%',
                        right: '4%',
                        bottom: '15%',
                        top:'3%',
                        containLabel: true
                    },

                    xAxis: [{
                        type: 'category',
                        boundaryGap: false,
                        axisLabel: {

                            textStyle: {
                                color: '#8b8b8b',
                                fontSize: 12
                            }
                        },
                        axisLine: {
                            lineStyle: {
                                color: '#fff'
                            }
                        },
                        data: date2
                    }],
                    yAxis: [{
                        type: 'value',
                        axisTick: {
                            show: false
                        },
                        axisLine: {
                            lineStyle: {
                                color: '#fff'
                            }
                        },
                        axisLabel: {
                            margin: 10,
                            textStyle: {
                                color: '#8b8b8b',
                                fontSize: 12
                            }
                        },
                        splitLine: {
                            lineStyle: {
                                color: '#fff'
                            }
                        }
                    }],
                    series: [
                        {
                            name: '开盖告警',
                            type: 'line',
                            smooth: true,
                            lineStyle: {
                                normal: {
                                    width: 1
                                }
                            },
                            areaStyle: {
                                normal: {
                                    color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                                        offset: 0,
                                        color: 'rgba(32, 78, 247, 0.3)'
                                    }, {
                                        offset: 0.8,
                                        color: 'rgba(32, 78, 247, 0)'
                                    }], false),
                                    shadowColor: 'rgba(0, 0, 0, 0.1)',
                                    shadowBlur: 10
                                }
                            },
                            itemStyle: {
                                normal: {
                                    color: 'rgb(32, 78, 247)'
                                }
                            },
                            data:kaigai2,
                        },
                        {
                            name: '出水告警',
                            type: 'line',
                            smooth: true,
                            lineStyle: {
                                normal: {
                                    width: 1
                                }
                            },
                            areaStyle: {
                                normal: {
                                    color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                                        offset: 0,
                                        color: 'rgba(41, 182, 255, 0.3)'
                                    }, {
                                        offset: 0.8,
                                        color: 'rgba(41, 182, 255, 0)'
                                    }], false),
                                    shadowColor: 'rgba(0, 0, 0, 0.1)',
                                    shadowBlur: 10
                                }
                            },
                            itemStyle: {
                                normal: {
                                    color: 'rgb(41, 182, 255)'
                                }
                            },
                            data:chushui2
                        },
                        {
                            name: '倾斜告警（焖盖）',
                            type: 'line',
                            smooth: true,
                            lineStyle: {
                                normal: {
                                    width: 1
                                }
                            },
                            areaStyle: {
                                normal: {
                                    color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                                        offset: 0,
                                        color: 'rgba(26, 192, 152, 0.3)'
                                    }, {
                                        offset: 0.8,
                                        color: 'rgba(26, 192, 152, 0)'
                                    }], false),
                                    shadowColor: 'rgba(0, 0, 0, 0.1)',
                                    shadowBlur: 10
                                }
                            },
                            itemStyle: {
                                normal: {
                                    color: 'rgb(26, 192, 152)'
                                }
                            },
                            data:qingxie2
                        },
                        {
                            name: '破坏告警（焖盖）',
                            type: 'line',
                            smooth: true,
                            lineStyle: {
                                normal: {
                                    width: 1
                                }
                            },
                            areaStyle: {
                                normal: {
                                    color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                                        offset: 0,
                                        color: 'rgba(250, 165, 37, 0.3)'
                                    }, {
                                        offset: 0.8,
                                        color: 'rgba(250, 165, 37, 0)'
                                    }], false),
                                    shadowColor: 'rgba(0, 0, 0, 0.1)',
                                    shadowBlur: 10
                                }
                            },
                            itemStyle: {
                                normal: {
                                    color: 'rgb(250, 165, 37)'
                                }
                            },
                            data:pohuai2
                        },
                        {
                            name: '缺电告警（焖盖）',
                            type: 'line',
                            smooth: true,
                            lineStyle: {
                                normal: {
                                    width: 1
                                }
                            },
                            areaStyle: {
                                normal: {
                                    color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                                        offset: 0,
                                        color: 'rgba(255, 120, 89, 0.3)'
                                    }, {
                                        offset: 0.8,
                                        color: 'rgba(255, 120, 89, 0)'
                                    }], false),
                                    shadowColor: 'rgba(0, 0, 0, 0.1)',
                                    shadowBlur: 10
                                }
                            },
                            itemStyle: {
                                normal: {
                                    color: 'rgb(255, 120, 89)'
                                }
                            },
                            data:quedian2
                        },
                        {
                            name: '故障告警（焖盖）',
                            type: 'line',
                            smooth: true,
                            lineStyle: {
                                normal: {
                                    width: 1
                                }
                            },
                            areaStyle: {
                                normal: {
                                    color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                                        offset: 0,
                                        color: 'rgba(160, 78, 247, 0.3)'
                                    }, {
                                        offset: 0.8,
                                        color: 'rgba(160, 78, 247, 0)'
                                    }], false),
                                    shadowColor: 'rgba(0, 0, 0, 0.1)',
                                    shadowBlur: 10
                                }
                            },
                            itemStyle: {
                                normal: {
                                    color: '#a04ef7'
                                }
                            },
                            data:guzhang2
                        },
                        {
                            name: '水压过高',
                            type: 'line',
                            smooth: true,
                            lineStyle: {
                                normal: {
                                    width: 1
                                }
                            },
                            itemStyle: {
                                normal: {
                                    color: '#29b600'
                                }
                            },
                            areaStyle: {
                                normal: {
                                    color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                                        offset: 0,
                                        color: 'rgba(41,182,0, 0.3)'
                                    }, {
                                        offset: 0.8,
                                        color: 'rgba(41,182,0, 0)'
                                    }], false),
                                    shadowColor: 'rgba(0, 0, 0, 0.1)',
                                    shadowBlur: 10
                                }
                            },
                            data:shuiya2
                        },
                        {
                            name: '故障告警(水压)',
                            type: 'line',
                            smooth: true,
                            lineStyle: {
                                normal: {
                                    width: 1
                                }
                            },
                            areaStyle: {
                                normal: {
                                    color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                                        offset: 0,
                                        color: 'rgba(24,144,152, 0.3)'
                                    }, {
                                        offset: 0.8,
                                        color: 'rgba(24,144,152, 0)'
                                    }], false),
                                    shadowColor: 'rgba(0, 0, 0, 0.1)',
                                    shadowBlur: 10
                                }
                            },
                            itemStyle: {
                                normal: {
                                    color: '#189098'
                                }
                            },
                            data:gugao2
                        },
                        {
                            name: '缺电告警(水压)',
                            type: 'line',
                            smooth: true,
                            lineStyle: {
                                normal: {
                                    width: 1
                                }
                            },
                            areaStyle: {
                                normal: {
                                    color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                                        offset: 0,
                                        color: 'rgba(250,100,37, 0.3)'
                                    }, {
                                        offset: 0.8,
                                        color: 'rgba(250,100,37, 0)'
                                    }], false),
                                    shadowColor: 'rgba(0, 0, 0, 0.1)',
                                    shadowBlur: 10
                                }
                            },
                            itemStyle: {
                                normal: {
                                    color: '#fa6425'
                                }
                            },
                            data:quegao2
                        },
                        {
                            name: '破坏告警(水压)',
                            type: 'line',
                            smooth: true,
                            lineStyle: {
                                normal: {
                                    width: 1
                                }
                            },
                            areaStyle: {
                                normal: {
                                    color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                                        offset: 0,
                                        color: 'rgba(0,120,89, 0.3)'
                                    }, {
                                        offset: 0.8,
                                        color: 'rgba(0,120,89, 0)'
                                    }], false),
                                    shadowColor: 'rgba(0, 0, 0, 0.1)',
                                    shadowBlur: 10
                                }
                            },
                            itemStyle: {
                                normal: {
                                    color: '#007859'
                                }
                            },
                            data:pogao2
                        },
                        {
                            name: '倾斜告警(水压)',
                            type: 'line',
                            smooth: true,
                            lineStyle: {
                                normal: {
                                    width: 1
                                }
                            },
                            areaStyle: {
                                normal: {
                                    color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                                        offset: 0,
                                        color: 'rgba(160,65,7, 0.3)'
                                    }, {
                                        offset: 0.8,
                                        color: 'rgba(160,65,7, 0)'
                                    }], false),
                                    shadowColor: 'rgba(0, 0, 0, 0.1)',
                                    shadowBlur: 10
                                }
                            },
                            itemStyle: {
                                normal: {
                                    color: '#a04107'
                                }
                            },
                            data:qinggao2
                        },
                        {
                            name: '水压过低',
                            type: 'line',
                            smooth: true,
                            lineStyle: {
                                normal: {
                                    width: 1
                                }
                            },
                            areaStyle: {
                                normal: {
                                    color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                                        offset: 0,
                                        color: 'rgba(28,65,7, 0.3)'
                                    }, {
                                        offset: 0.8,
                                        color: 'rgba(28,65,7, 0)'
                                    }], false),
                                    shadowColor: 'rgba(0, 0, 0, 0.1)',
                                    shadowBlur: 10
                                }
                            },
                            itemStyle: {
                                normal: {
                                    color: '#1c4107'
                                }
                            },
                            data:shuidi2
                        },
                        {
                            name: '失联告警(闷盖)',
                            type: 'line',
                            smooth: true,
                            lineStyle: {
                                normal: {
                                    width: 1
                                }
                            },
                            areaStyle: {
                                normal: {
                                    color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                                        offset: 0,
                                        color: 'rgba(160,75,199, 0.3)'
                                    }, {
                                        offset: 0.8,
                                        color: 'rgba(160,75,199, 0)'
                                    }], false),
                                    shadowColor: 'rgba(0, 0, 0, 0.1)',
                                    shadowBlur: 10
                                }
                            },
                            itemStyle: {
                                normal: {
                                    color: '#a04bc7'
                                }
                            },
                            data:shigao2
                        },
                        {
                            name: '失联告警(水压)',
                            type: 'line',
                            smooth: true,
                            lineStyle: {
                                normal: {
                                    width: 1
                                }
                            },
                            areaStyle: {
                                normal: {
                                    color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                                        offset: 0,
                                        color: 'rgba(160,74,7, 0.3)'
                                    }, {
                                        offset: 0.8,
                                        color: 'rgba(160,74,7, 0)'
                                    }], false),
                                    shadowColor: 'rgba(0, 0, 0, 0.1)',
                                    shadowBlur: 10
                                }
                            },
                            itemStyle: {
                                normal: {
                                    color: '#a04a07'
                                }
                            },
                            data:shishui2
                        }]
                };


                qushiChart.setOption(qushiOption);


            });
            for(var key in tubiaoData.wulianwang[1].yjgAllInfo[1].stateInfo){
                for(var keys in tubiaoData.wulianwang[1].yjgAllInfo[1].stateInfo[key]){
                    bufang.push(keys);
                    chefang.push(tubiaoData.wulianwang[1].yjgAllInfo[1].stateInfo[key][keys]);

                };

            }
            for(var k in tubiaoData.wulianwang[0].xfsAllInfo[1].stateInfo){
                for(var ks in tubiaoData.wulianwang[0].xfsAllInfo[1].stateInfo[k]){
                    bufang2.push(ks);
                    chefang2.push(tubiaoData.wulianwang[0].xfsAllInfo[1].stateInfo[k][ks]);
                };

            }
           var bufangHtml=''+bufang[0]+'：<span class="anfang">'+chefang[0]+'</span>'+bufang[1]+'：<span class="anfang">'+chefang[1]+'</span>'+bufang[2]+'：<span class="anfang">'+chefang[2]+'</span>'+bufang[3]+'：<span class="anfang">'+chefang[3]+'</span>'+bufang[4]+'：<span class="anfang">'+chefang[4]+'</span>';

            var bufangHtml2=''+bufang2[0]+'：<span class="anfang">'+chefang2[0]+'</span>'+bufang2[1]+'：<span class="anfang">'+chefang2[1]+'</span>'+bufang2[2]+'：<span class="anfang">'+chefang2[2]+'</span>'+bufang2[3]+'：<span class="anfang">'+chefang2[3]+'</span>'+bufang2[4]+'：<span class="bufang">'+chefang2[4]+'</span>';
            $('.ca-bor').append(bufangHtml2);
            $('.jiankong').append(bufangHtml);
            $(function () {
                var xfNum = [];
                var xfSum = [];
                for (var i = 0; i < tubiaoData.wulianwang[0].xfsAllInfo[0].xfsInfo.length; i++) {
                    xfNum.push(tubiaoData.wulianwang[0].xfsAllInfo[0].xfsInfo[i].firehydrantNo);
                    xfSum.push(tubiaoData.wulianwang[0].xfsAllInfo[0].xfsInfo[i].pressure);
                }
                ;
                var xiaofangChart = echarts.init(document.getElementById('xiaofangshuang-chart'));
                var xiaofangOption = {
                    // color: ['#23edef', 'rgba(255,51,75,0.8)', 'rgba(250,186,37,0.8)'],
                    color: ['#23edef', '#ff334b'],
                    tooltip: {
                        trigger: 'axis',
                        axisPointer: {
                            type: 'none'
                        },
                        formatter: function (params) {
                            return params[0].name + ': ' + params[0].value;
                        }
                    },
                    grid: {
                        left: '3%',
                        right: '4%',
                        bottom: '3%',
                        top: '4%',
                        containLabel: true
                    },
                    xAxis: {
                        data: xfNum,
                        axisTick: {
                            show: false
                        },
                        axisLine: {
                            show: false
                        },
                        axisLabel: {
                            textStyle: {
                                color: '#737373',
                                fontSize: 12
                            }
                        }
                    },
                    yAxis: {
                        splitLine: {
                            show: false
                        },
                        axisTick: {
                            show: false
                        },
                        axisLine: {
                            show: false
                        },
                        axisLabel: {
                            textStyle: {
                                color: '#737373',
                                fontSize: 12
                            },
                            formatter: '{value}MPA',
                        },
                        splitLine: {
                            lineStyle: {
                                color: ['rgba(35,237,239,0.5)']
                            }
                        },
                        splitArea: {
                            show: true,
                            areaStyle: {
                                color: ['rgba(35,237,239,0.1)']
                            }
                        }
                    },
                    series: [{
                        name: 'hill',
                        type: 'pictorialBar',
                        barCategoryGap: '-20%',
                        // symbol: 'path://M0,10 L10,10 L5,0 L0,10 z',
                        symbol: 'path://M0,10 L10,10 C5.5,10 5.5,5 5,0 C4.5,5 4.5,10 0,10 z',
                        label: {
                            normal: {
                                show: true,
                                position: 'top',
                                formatter: '{c}MPA',
                                textStyle: {
                                    color: 'white',
                                    fontSize: 18
                                }
                            }
                        },
                        itemStyle: {
                            normal: {
                                opacity: 0.8,
                                // color: function(params) {
                                //     // build a color map as your need.
                                //     var colorList = [
                                //         '#23edef','#ff334b','#faba25','#23edef','#23edef',
                                //     ];
                                //     return colorList[params.dataIndex]
                                // },
                            },
                            emphasis: {
                                opacity: 1
                            },
                        },
                        data: xfSum,
                        z: 10
                    },]
                };
                xiaofangChart.setOption(xiaofangOption);
            });
        }})
    $('#zhankai').click(function(){
        $('.moban-tab').hide();
        $('.xfs2').show();
    });
    $('#shouqi').click(function(){
        $('.moban-tab').hide();
        $('.xfs1').show();
    });

})
